import AdminUser.AdminUer;
import AdminUser.NormalUser;
import AdminUser.User;
import Book.BookList;

import java.util.Scanner;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * user:likai
 * Date:2022-09-30
 * Time:11:40
 */
public class Library {

    public static User login(){
        System.out.println("请输入姓名：");
        Scanner scanner=new Scanner(System.in);
        String username=scanner.nextLine();
        System.out.println("请输入你的身份:1->管理员   0->用户");
        int choice=scanner.nextInt();
        if(choice==1){
            return new AdminUer(username);
        } else {
            return new NormalUser(username);
        }
    }

    public static void doOperation(int choice,BookList bookList){

    }
    public static void main(String[] args) {
        BookList bookList=new BookList();
        User user =login();
       while(true){
           int choice=user.menu();
           user.doOperation(choice,bookList);
       }
    }
}
